package com.xyy.kingdeek3cloud.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class SaveOrderEntity {

    @JsonProperty("FID")
    private Integer fid;
    @JsonProperty("FBillTypeID")
    private FBillTypeIDDTO fBillTypeID;
    @JsonProperty("FBillNo")
    private String fBillNo;
    @JsonProperty("FDate")
    private String fDate;
    @JsonProperty("FCustId")
    private FCustIdDTO fCustId;
    @JsonProperty("FReceiveId")
    private FReceiveIdDTO fReceiveId;
    @JsonProperty("FSettleId")
    private FSettleIdDTO fSettleId;
    @JsonProperty("FChargeId")
    private FChargeIdDTO fChargeId;
    @JsonProperty("FISINIT")
    private Boolean fisinit;
    @JsonProperty("FIsMobile")
    private Boolean fIsMobile;
    @JsonProperty("FIsUseOEMBomPush")
    private Boolean fIsUseOEMBomPush;
    @JsonProperty("FIsUseDrpSalePOPush")
    private Boolean fIsUseDrpSalePOPush;
    @JsonProperty("FIsCreateStraightOutIN")
    private Boolean fIsCreateStraightOutIN;
    @JsonProperty("FSaleOrderFinance")
    private FSaleOrderFinanceDTO fSaleOrderFinance;
    @JsonProperty("FSaleOrderEntry")
    private List<FSaleOrderEntryDTO> fSaleOrderEntry;
    @JsonProperty("FSaleOrderPlan")
    private List<FSaleOrderPlanDTO> fSaleOrderPlan;

    //@NoArgsConstructor
    @Data
    public static class FBillTypeIDDTO {
        @JsonProperty("FNUMBER")
        private String fnumber;
    }

    @NoArgsConstructor
    @Data
    public static class FCustIdDTO {
        @JsonProperty("FNumber")
        private String fNumber;
    }

    @NoArgsConstructor
    @Data
    public static class FReceiveIdDTO {
        @JsonProperty("FNumber")
        private String fNumber;
    }

    @NoArgsConstructor
    @Data
    public static class FSettleIdDTO {
        @JsonProperty("FNumber")
        private String fNumber;
    }

    @NoArgsConstructor
    @Data
    public static class FChargeIdDTO {
        @JsonProperty("FNumber")
        private String fNumber;
    }

    @NoArgsConstructor
    @Data
    public static class FSaleOrderFinanceDTO {
        @JsonProperty("FSettleCurrId")
        private FSettleCurrIdDTO fSettleCurrId;
        @JsonProperty("FIsPriceExcludeTax")
        private Boolean fIsPriceExcludeTax;
        @JsonProperty("FIsIncludedTax")
        private Boolean fIsIncludedTax;
        @JsonProperty("FExchangeTypeId")
        private FExchangeTypeIdDTO fExchangeTypeId;
        @JsonProperty("FOverOrgTransDirect")
        private Boolean fOverOrgTransDirect;

        @NoArgsConstructor
        @Data
        public static class FSettleCurrIdDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        public static class FExchangeTypeIdDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }
    }

    @NoArgsConstructor
    @Data
    public static class FSaleOrderEntryDTO {
        @JsonProperty("FRowType")
        private String fRowType;
        @JsonProperty("FMaterialId")
        private FMaterialIdDTO fMaterialId;
        @JsonProperty("FUnitID")
        private FUnitIDDTO fUnitID;
        @JsonProperty("FQty")
        private Integer fQty;
        @JsonProperty("FPriceUnitId")
        private FPriceUnitIdDTO fPriceUnitId;
        @JsonProperty("FIsFree")
        private Boolean fIsFree;
        @JsonProperty("FEntryTaxRate")
        private Integer fEntryTaxRate;
        @JsonProperty("FDeliveryDate")
        private String fDeliveryDate;
        @JsonProperty("FOwnerTypeId")
        private String fOwnerTypeId;
        @JsonProperty("FOwnerId")
        private FOwnerIdDTO fOwnerId;
        @JsonProperty("FReserveType")
        private String fReserveType;
        @JsonProperty("FPriceBaseQty")
        private Integer fPriceBaseQty;
        @JsonProperty("FStockUnitID")
        private FStockUnitIDDTO fStockUnitID;
        @JsonProperty("FStockQty")
        private Integer fStockQty;
        @JsonProperty("FStockBaseQty")
        private Integer fStockBaseQty;
        @JsonProperty("FOUTLMTUNIT")
        private String foutlmtunit;
        @JsonProperty("FOutLmtUnitID")
        private FOutLmtUnitIDDTO fOutLmtUnitID;
        @JsonProperty("FISMRP")
        private Boolean fismrp;
        @JsonProperty("F_URYX_Assistant1")
        private FURYXAssistant1DTO fUryxAssistant1;
        @JsonProperty("FOrderEntryPlan")
        private List<FOrderEntryPlanDTO> fOrderEntryPlan;

        @NoArgsConstructor
        @Data
        public static class FMaterialIdDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        public static class FUnitIDDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        public static class FPriceUnitIdDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        public static class FOwnerIdDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        public static class FStockUnitIDDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        public static class FOutLmtUnitIDDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        public static class FURYXAssistant1DTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        public static class FOrderEntryPlanDTO {
            @JsonProperty("FPlanDate")
            private String fPlanDate;
            @JsonProperty("FPlanQty")
            private Integer fPlanQty;
        }
    }
    @NoArgsConstructor
    @Data
    public static class FSaleOrderPlanDTO {
        @JsonProperty("FNeedRecAdvance")
        private Boolean fNeedRecAdvance;
        @JsonProperty("FRecAdvanceRate")
        private Integer fRecAdvanceRate;
        @JsonProperty("FIsOutStockByRecamount")
        private Boolean fIsOutStockByRecamount;
    }
}
